#include "QtUI/QtPackageViewBase.hpp"
#include "QtUI/Impl/QtPackageViewImpl.qth"

namespace QtUI
{

QtPackageViewBase::QtPackageViewBase( Ctrl::PackageController& ctrler )
	: AbsUI::PackageView( ctrler)
	, pImpl_( new Impl::QtPackageViewImpl( *this))
{
}

// ---------------------------------------------------------------------------------------------------------------------

QtPackageViewBase::~QtPackageViewBase()
{
	delete pImpl_;
}

// ---------------------------------------------------------------------------------------------------------------------

void QtPackageViewBase::addNewPackage( Model::Package* pParentPackage, Model::Package* pNewPackage)
{
	Q_EMIT pImpl_->packageAddedSignal( pParentPackage, pNewPackage);
}

// ---------------------------------------------------------------------------------------------------------------------

void QtPackageViewBase::removePackage( Model::Package* pParentPackage, Model::Package* pRemovedPackage)
{
	Q_EMIT pImpl_->packageRemovedSignal( pParentPackage, pRemovedPackage);
}

// ---------------------------------------------------------------------------------------------------------------------

void QtPackageViewBase::addRootRequirement( Model::Package* pParent, Model::Requirement* pAddedRequirement )
{
	Q_EMIT pImpl_->rootRequirementAddedSignal( pParent, pAddedRequirement);
}

// ---------------------------------------------------------------------------------------------------------------------

void QtPackageViewBase::removeRootRequirement( Model::Package* pParent, Model::Requirement* pRemovedRequirement )
{
	Q_EMIT pImpl_->rootRequirementRemovedSignal( pParent, pRemovedRequirement);
}

} // namespace QtUI
